package com.example.demo.day0305;


import jdk.internal.instrumentation.InstrumentationTarget;
import org.omg.PortableServer.ServantRetentionPolicy;

import javax.annotation.Resource;

public class Hero {
    @Deprecated//标记过时方法
    public void say(){
        System.out.println("Noting has to say!");
    }
    public void speak(){
        System.out.println("I have a dream!");
    }
    @SuppressWarnings("all")//阻止警告,一般传递参数all
    public void test1(){
        Hero hero = new Hero();
        hero.say();
        hero.speak();
    }
}
